<?php 
function pageTitle($get) {
	$title = array();
	if(isset($get['ctg_id'])) {
		require 'lib/php/dbCon.php';
		$query = 'SELECT ctg_label FROM ak_categories WHERE ctg_id = '.$get['ctg_id'].' LIMIT 1';
		if($result = mysql_query($query)) {
			$row = mysql_fetch_assoc($result);
			array_push($title, $row[ctg_label]);
		}
	}
	if(isset($get['prj_id'])) {
		require 'lib/php/dbCon.php';
		$query = 'SELECT prj_label FROM ak_projects WHERE prj_id = '.$get['prj_id'].' LIMIT 1';
		if($result = mysql_query($query)) {
			$row = mysql_fetch_assoc($result);
			array_push($title, $row[prj_label]);
		}
	}
	if(isset($get['btn_id'])) {
		require 'lib/php/dbCon.php';
		$query = 'SELECT btn_label FROM ak_buttons WHERE btn_id = '.$get['btn_id'].' LIMIT 1';
		if($result = mysql_query($query)) {
			$row = mysql_fetch_assoc($result);
			array_push($title, $row[btn_label]);
		}
	}
	if(count($title) > 0)
		return ' :: '.join(' :: ', $title);
	else
		return '';
}
?>